import request from '@/config/axios'

export interface AccountingRewardsPunishmentsVO {
  id: number
  jobNumber: string
  userName: string
  teamCode: string
  teamName: string
  post: number
  postName: string
  rewardType: number
  rewardPrice: number
  rewardReason: string
  rewardStatus: number
  creatorName: string
}

// 查询奖惩管理列表
export const getAccountingRewardsPunishmentsPage = async (params) => {
  return await request.get({ url: `/salary/accounting-rewards-punishments/page`, params })
}

// 查询奖惩管理详情
export const getAccountingRewardsPunishments = async (id: number) => {
  return await request.get({ url: `/salary/accounting-rewards-punishments/get?id=` + id })
}

// 新增奖惩管理
export const createAccountingRewardsPunishments = async (data: AccountingRewardsPunishmentsVO) => {
  return await request.post({ url: `/salary/accounting-rewards-punishments/create`, data })
}

// 修改奖惩管理
export const updateAccountingRewardsPunishments = async (data: AccountingRewardsPunishmentsVO) => {
  return await request.put({ url: `/salary/accounting-rewards-punishments/update`, data })
}

// 删除奖惩管理
export const deleteAccountingRewardsPunishments = async (id: number) => {
  return await request.delete({ url: `/salary/accounting-rewards-punishments/delete?id=` + id })
}

// 导出奖惩管理 Excel
export const exportAccountingRewardsPunishments = async (params) => {
  return await request.download({ url: `/salary/accounting-rewards-punishments/export-excel`, params })
}
